package edu.njfu.intentdemo2

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_second.*

class SecondActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_second)
        button2.setOnClickListener {
            val name= intent.getStringExtra("name")
            val password= intent.getStringExtra("password")
            Toast.makeText(this,"用户名为：$name,密码为：$password",Toast.LENGTH_LONG).show()

        }
    }
}